use shared::types::{FtpResponse, FtpResponseCode};

/// 创建成功响应
pub fn success_response(message: &str) -> FtpResponse {
    FtpResponse::new(FtpResponseCode::CommandOk, message)
}

/// 创建错误响应
pub fn error_response(message: &str) -> FtpResponse {
    FtpResponse::new(FtpResponseCode::LocalError, message)
}

/// 创建参数错误响应
pub fn parameter_error_response(message: &str) -> FtpResponse {
    FtpResponse::new(FtpResponseCode::ParameterSyntaxError, message)
}

/// 创建未实现命令响应
pub fn not_implemented_response() -> FtpResponse {
    FtpResponse::new(FtpResponseCode::CommandNotImplemented, "Command not implemented")
}

/// 创建需要认证响应
pub fn authentication_required_response() -> FtpResponse {
    FtpResponse::new(FtpResponseCode::NotLoggedIn, "Please log in first")
}

/// 创建权限拒绝响应
pub fn permission_denied_response() -> FtpResponse {
    FtpResponse::new(FtpResponseCode::FileNotFound, "Permission denied")
}
